package com.zr.service.order;

import com.github.pagehelper.PageInfo;
import com.zr.exception.BusinessException;
import com.zr.vo.order.OrderForm;
import java.util.List;
import java.util.Map;

/**
 * 委托订单处理
 * @author huangguilong
 */
public interface OrderFormService {

    /**
     * 条件查询委托订单列表
     * @param orderForm
     * @return PageInfo<OrderForm>
     * @author huangguilong
     */
    PageInfo<OrderForm> list(OrderForm orderForm);

    /**
     * 新增委托订单
     * @param orderForm
     * @return int
     * @author huangguilong
     */
    int add(OrderForm orderForm) throws BusinessException;

    /**
     * 编辑委托订单
     * @param orderForm
     * @return int
     * @author huangguilong
     */
    int edit(OrderForm orderForm);

    /**
     * 删除委托订单
     * @param orderForm
     * @return int
     * @author huangguilong
     */
    int remove(OrderForm orderForm);

    /**
     * 根据客户获取委托订单
     * @param orderForm
     * @return PageInfo<OrderForm>
     * @author wanglu
     */
    PageInfo<OrderForm> getByCustomer(OrderForm orderForm);

    /**
     * 查询当日新增委托单数量
     * @return int
     * @author 张荣颜
     */
    int getTodayAddQuantity();

    /**
     * 查询最近一年,每个月的订单数量
     * @return List<OrderForm>
     * @author 张荣颜
     */
    List<OrderForm> getChangeOfOrderQuantityYear();

    /**
     * 查询未完成的订单数量
     * @return int
     * @author 张荣颜
     */
    int getOrderUnfinishedQuantity();

    /**
     * 查询各个城市的订单数量与货重
     * @return List<OrderForm>
     * @author 张荣颜
     */
    List<OrderForm> getCityOrderWeight();

    /**
     * 查询已经结算货款与未结算货款
     * @return List<Map>
     * @author 张荣颜
     */
    List<Map> getIncomeStatus();

    /**
     * 查询当前调度单未被派发的订单
     * @param id
     * @return List<OrderForm>
     * @author chenpeng
     */
    List<OrderForm> listByDispatch(Integer id);

    /**
     * 获取送达图片
     * @param finishImg
     * @return String
     * @author chenpeng
     */
    String getImg(String finishImg);

    /**
     * 查询近六个月订单
     * @return List<OrderForm>
     * @author 张荣颜
     */
    List<OrderForm> getChangeOfOrderQuantitySixMonths();

    /**
     * 查询近一个月订单
     * @return List<OrderForm>
     * @author 张荣颜
     */
    List<OrderForm> getChangeOfOrderQuantityOneMonth();
}
